* Figure 4
	
* Figure 4 (a)
use "database_unemployment.dta", clear

* Here I just copy-pasted the gmi from "cmie_stats.xlsx" page gmi, column H. av. Next 7 days
line unemp date if date <22150 & year >2019, lcolor(black) lwidth(medthick) xline(21996 22025 22039 22067 22097,lpattern(dash) lcolor(gray) lwidth(thin)) || (scatter monthly_Bihar date if date <22150 & year >2019, mcolor(blue))   || (line gmi date if date <22150 & year >2019, lcolor(red)  yaxis(2)), legend(label(1 "Unemployment India (weekly)")  label(2 "Unemployment Bihar (monthly)") label(3 "Google Mobility Index") col(2) size(small) pos(6) ) graphregion(fcolor(white) lcolor(white)) xtitle("") xlabel( 21996 22025 22039 22067 22097, labsize(vsmall) angle(45)) ylabel(-250(100)50, axis(2)) ytitle("Percent") ytitle("GMI", axis(2))
 	graph export "tables and figures\India_unemployment_Bihar_2020_gmi.pdf" ,replace 	
	
	 
 
* Figure b 
import excel "cmie_economy_bihar.xlsx", sheet("Sheet1") firstrow clear
destring savings_fixed - adj_total_expenditure, force replace
 
gen date = monthly( mdate , "YM")
format date %tm

line total_income date if month<9, lcolor(green) lwidth(thick) xline(723 726, lpattern(dash) lcolor(gray) lwidth(thin)  ) || (line adj_total_expenditure date if month<9, lcolor(black)  lwidth(thick)  ) || (line savings_fixed date if month<9, lcolor(blue) lpattern(dash) lwidth(medthick) yaxis(2))  || (line borrow date if month<9, lcolor(red) lpattern(dash) lwidth(medthick) yaxis(2)), legend(label(1 "Total Income")  label(2 "Total Expenses")  label (3 "Savings") label (4 "Borrowing") col(2) pos(6)) graphregion(fcolor(white) lcolor(white)) xtitle("") xlabel(#8, labsize(vsmall)) ytitle("Indian Rupees")  ytitle("Percentage", axis(2))

 graph export "tables and figures\income_expenses_savings_borrowing.pdf", replace





